<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibQQt: QQtNamedPipeClient Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibQQt
   &#160;<span id="projectnumber">v3.1</span>
   </div>
   <div id="projectbrief">开源、跨平台Qt应用程序框架中间件</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#signals">Signals</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-slots">Protected Slots</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="class_q_qt_named_pipe_client-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">QQtNamedPipeClient Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>客户端决定和协议的交互关系;只跟协议打交道； 处理粘包，数少包。 通过安装协议，支持客户通信 打开， 发送，接收，splitter，dispatcher 关闭。  
 <a href="class_q_qt_named_pipe_client.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="qqtnamedpipeclient_8h_source.html">qqtnamedpipeclient.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for QQtNamedPipeClient:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_q_qt_named_pipe_client.png" usemap="#QQtNamedPipeClient_map" alt=""/>
  <map id="QQtNamedPipeClient_map" name="QQtNamedPipeClient_map">
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="signals"></a>
Signals</h2></td></tr>
<tr class="memitem:a47811c7a78f95b1e4585e66f0730f563"><td class="memItemLeft" align="right" valign="top"><a id="a47811c7a78f95b1e4585e66f0730f563"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>signalConnecting</b> ()</td></tr>
<tr class="separator:a47811c7a78f95b1e4585e66f0730f563"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc50148c5f39fda58f60ec2d557f6f9d"><td class="memItemLeft" align="right" valign="top"><a id="afc50148c5f39fda58f60ec2d557f6f9d"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>signalConnectSucc</b> ()</td></tr>
<tr class="separator:afc50148c5f39fda58f60ec2d557f6f9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56b7ca0f8a546887f0ee05c72b8ea61c"><td class="memItemLeft" align="right" valign="top"><a id="a56b7ca0f8a546887f0ee05c72b8ea61c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>signalConnectFail</b> ()</td></tr>
<tr class="separator:a56b7ca0f8a546887f0ee05c72b8ea61c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af86b2ea777ea7fd78214149393898661"><td class="memItemLeft" align="right" valign="top"><a id="af86b2ea777ea7fd78214149393898661"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>signalConnectError</b> ()</td></tr>
<tr class="separator:af86b2ea777ea7fd78214149393898661"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab8ad25e3ab63ecac005af526f7f0c974"><td class="memItemLeft" align="right" valign="top"><a id="ab8ad25e3ab63ecac005af526f7f0c974"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>signalDisConnectSucc</b> ()</td></tr>
<tr class="separator:ab8ad25e3ab63ecac005af526f7f0c974"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5edd02525f965e6c9ec7ebf59281248d"><td class="memItemLeft" align="right" valign="top"><a id="a5edd02525f965e6c9ec7ebf59281248d"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>signalDisConnectFail</b> ()</td></tr>
<tr class="separator:a5edd02525f965e6c9ec7ebf59281248d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5cab399ee960e5dcdb0f7f68b5fe373"><td class="memItemLeft" align="right" valign="top"><a id="ad5cab399ee960e5dcdb0f7f68b5fe373"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>signalUpdateProgress</b> (qint64 value)</td></tr>
<tr class="separator:ad5cab399ee960e5dcdb0f7f68b5fe373"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:abedd9c01437c5ca4e2973260bce0411b"><td class="memItemLeft" align="right" valign="top"><a id="abedd9c01437c5ca4e2973260bce0411b"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>QQtNamedPipeClient</b> (QObject *parent=0)</td></tr>
<tr class="separator:abedd9c01437c5ca4e2973260bce0411b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9ca1b3c6efdcb84965191d75c412684"><td class="memItemLeft" align="right" valign="top"><a id="ac9ca1b3c6efdcb84965191d75c412684"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setServerIPAddress</b> (QString ip)</td></tr>
<tr class="separator:ac9ca1b3c6efdcb84965191d75c412684"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1eb2955d1f5d97ba068622351201756c"><td class="memItemLeft" align="right" valign="top"><a id="a1eb2955d1f5d97ba068622351201756c"></a>
QStringList &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>serverIPAddress</b> ()</td></tr>
<tr class="separator:a1eb2955d1f5d97ba068622351201756c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5fc853fe803baf091b8adf0e08f28506"><td class="memItemLeft" align="right" valign="top"><a id="a5fc853fe803baf091b8adf0e08f28506"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setServerIPAddress</b> (QStringList ipList)</td></tr>
<tr class="separator:a5fc853fe803baf091b8adf0e08f28506"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7fcd7e037795af63d3dea99a67ea9ed"><td class="memItemLeft" align="right" valign="top"><a id="ab7fcd7e037795af63d3dea99a67ea9ed"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>installProtocol</b> (<a class="el" href="class_q_qt_protocol.html">QQtProtocol</a> *stack)</td></tr>
<tr class="separator:ab7fcd7e037795af63d3dea99a67ea9ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a12359131685a780f2b5d505d08ae5b80"><td class="memItemLeft" align="right" valign="top"><a id="a12359131685a780f2b5d505d08ae5b80"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>uninstallProtocol</b> (<a class="el" href="class_q_qt_protocol.html">QQtProtocol</a> *stack)</td></tr>
<tr class="separator:a12359131685a780f2b5d505d08ae5b80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae82259a41f86af3725e13dd1eff73851"><td class="memItemLeft" align="right" valign="top"><a id="ae82259a41f86af3725e13dd1eff73851"></a>
<a class="el" href="class_q_qt_protocol.html">QQtProtocol</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>installedProtocol</b> ()</td></tr>
<tr class="separator:ae82259a41f86af3725e13dd1eff73851"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c0f95a9df54e3a6ddf96bd1db042003"><td class="memItemLeft" align="right" valign="top"><a id="a7c0f95a9df54e3a6ddf96bd1db042003"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>sendConnectToHost</b> ()</td></tr>
<tr class="separator:a7c0f95a9df54e3a6ddf96bd1db042003"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac2ab3fd08e6cc7f75070ced80f800c3c"><td class="memItemLeft" align="right" valign="top"><a id="ac2ab3fd08e6cc7f75070ced80f800c3c"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>sendDisConnectFromHost</b> ()</td></tr>
<tr class="separator:ac2ab3fd08e6cc7f75070ced80f800c3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abff74f5178be2fdf799d6707ee5510b2"><td class="memItemLeft" align="right" valign="top"><a id="abff74f5178be2fdf799d6707ee5510b2"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setPeerName</b> (QString name)</td></tr>
<tr class="separator:abff74f5178be2fdf799d6707ee5510b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27aadce8c91dcd7264a7e4a64dcd223b"><td class="memItemLeft" align="right" valign="top"><a id="a27aadce8c91dcd7264a7e4a64dcd223b"></a>
QString&#160;</td><td class="memItemRight" valign="bottom"><b>peerName</b> ()</td></tr>
<tr class="separator:a27aadce8c91dcd7264a7e4a64dcd223b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-slots"></a>
Protected Slots</h2></td></tr>
<tr class="memitem:ae7567faac96841b392cfae6af811f1d2"><td class="memItemLeft" align="right" valign="top"><a id="ae7567faac96841b392cfae6af811f1d2"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>readyReadData</b> ()</td></tr>
<tr class="separator:ae7567faac96841b392cfae6af811f1d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41088fce8513dbfeea0c3db582afb233"><td class="memItemLeft" align="right" valign="top"><a id="a41088fce8513dbfeea0c3db582afb233"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>slotWriteData</b> (const QByteArray &amp;)</td></tr>
<tr class="separator:a41088fce8513dbfeea0c3db582afb233"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a7387042a99d784dd90748ae68bb1be69"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_qt_named_pipe_client.html#a7387042a99d784dd90748ae68bb1be69">translator</a> (const QByteArray &amp;bytes)</td></tr>
<tr class="memdesc:a7387042a99d784dd90748ae68bb1be69"><td class="mdescLeft">&#160;</td><td class="mdescRight">translator 用于拆分和分发数据报  <a href="#a7387042a99d784dd90748ae68bb1be69">More...</a><br /></td></tr>
<tr class="separator:a7387042a99d784dd90748ae68bb1be69"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a300d1f3d277d809ff500f2e1292a329e"><td class="memItemLeft" align="right" valign="top"><a id="a300d1f3d277d809ff500f2e1292a329e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>connectToSingelHost</b> ()</td></tr>
<tr class="separator:a300d1f3d277d809ff500f2e1292a329e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>客户端决定和协议的交互关系;只跟协议打交道； 处理粘包，数少包。 通过安装协议，支持客户通信 打开， 发送，接收，splitter，dispatcher 关闭。 </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a7387042a99d784dd90748ae68bb1be69"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7387042a99d784dd90748ae68bb1be69">&#9670;&nbsp;</a></span>translator()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void QQtNamedPipeClient::translator </td>
          <td>(</td>
          <td class="paramtype">const QByteArray &amp;&#160;</td>
          <td class="paramname"><em>bytes</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>translator 用于拆分和分发数据报 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bytes</td><td></td></tr>
  </table>
  </dd>
</dl>
<p>这个地方的实现，还是有一些复杂， 但是只有流式传输才需要， 而且，每种通讯接口的流式传输都是一样的， 过去，写在protocol里是为了增添传输工具客户端类型方便 现在，这块比较稳定，所以挪动回来。</p>
<p>只能安装一个协议。 如果安装多个，这个地方的static，需要给协议们分配独立的buffer。 一个客户端，和服务器通信，一条流，可以由多个协议进行解析吗？</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>R:/Develop/a0-develop/LibQQt/src/highgrade/network/<a class="el" href="qqtnamedpipeclient_8h_source.html">qqtnamedpipeclient.h</a></li>
<li>R:/Develop/a0-develop/LibQQt/src/highgrade/network/qqtnamedpipeclient.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
